package com.elead.oa.controller;

import com.elead.oa.entity.Schedule;
import com.elead.oa.service.schedule.IScheduleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 排班管理
 * ScheduleController
 * 创建人:xiaozuolin
 * 创建时间：2021年09月28日 14:18:18
 *
 * @version 1.0.0
 */
@RestController
@RequestMapping("/schedule")
@Slf4j
@CrossOrigin
@Api(tags = "排班控制层")
public class ScheduleController {

    @Autowired
    private IScheduleService scheduleService;

    @GetMapping("/list")
    @ApiOperation(value = "查询所有排班表信息",httpMethod = "GET",produces = "application/json",notes = "查询所有排班表信息")
    public List<Schedule> list(){
        return scheduleService.list();
    }

}